/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.cabinetdoor.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.locationarea.entity.BizLocationArea;
import vip.xiaonuo.biz.modular.locationbuilding.entity.BizLocationBuilding;
import vip.xiaonuo.biz.modular.locationroom.entity.BizLocationRoom;
import vip.xiaonuo.common.pojo.CommonEntity;

/**
 * 柜门信息实体
 *
 * @author kongxm
 * @date 2022/11/13 16:14
 **/
@Getter
@Setter
@TableName("BIZ_CABINET_DOOR")
public class BizCabinetDoor extends CommonEntity implements TransPojo {

    /**
     * ID
     */
    @TableId
    @ApiModelProperty(value = "ID", position = 1)
    private String id;

    /**
     * 柜门名称
     */
    @ApiModelProperty(value = "柜门名称", position = 2)
    private String cabinetDoorName;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", position = 3)
    private String remark;

    /**
     * 状态 0-禁用 1-启用
     */
    @ApiModelProperty(value = "状态 0-禁用 1-启用", position = 5)
    private Integer state;

    /**
     * 柜门ID
     */
    @ApiModelProperty(value = "柜门代码", position = 10)
    private String cabinetDoorCode;

    /**
     * 权限最大天数
     */
    @ApiModelProperty(value = "权限最大天数", position = 11)
    @TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
    private Integer maxPermDays;

    @ApiModelProperty(value = "是否独立权限", position = 12)
    private Boolean separatedPermission;

    @ApiModelProperty(value = "盘库周期", position = 13)
    private Integer makingInventoryCycle;

    @ApiModelProperty(value = "盘库周期单位 0-天 1-小时", position = 14)
    private Integer makingInventoryUnit;

    @ApiModelProperty(value = "是否独立设置盘库时间，0-否 1-是", position = 15)
    private Boolean makingInventoryConfigSeparated;

    private String cabinetInfoId;

    private String cabinetGroupId;

    @Trans(type = TransType.SIMPLE, target = BizLocationArea.class, fields = "name", ref = "areaName")
    private String areaId;

    @Trans(type = TransType.SIMPLE, target = BizLocationBuilding.class, fields = "name", ref = "buildingName")
    private String buildingId;

    @Trans(type = TransType.SIMPLE, target = BizLocationRoom.class, fields = "name", ref = "roomName")
    private String roomId;

    @TableField(exist = false)
    private String areaName;

    @TableField(exist = false)

    private String buildingName;

    @TableField(exist = false)
    private String roomName;

    private String cabinetDoorNamePinyin;

    @ApiModelProperty(value = "初始化标记 0-否 1-是", position = 14)
    private Integer initFlag;

    @ApiModelProperty(value = "0-物品 1-试剂")
    private Integer cabinetDoorType;

    @ApiModelProperty(value = "存放试剂类型")
    private String reagentStorageType;
}
